package com.javaweb.admin.controller;

import com.javaweb.admin.entity.C37InfJcDwzl;
import com.javaweb.admin.mapper.JztCustAddrMapper;
import com.javaweb.admin.query.JztCustAddrQuery;
import com.javaweb.admin.service.IC37InfJcDwzlService;
import com.javaweb.common.annotation.Log;
import com.javaweb.common.enums.LogType;
import com.javaweb.common.utils.JsonResult;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/c37infjcdwdzzl")
public class C37InfJcDwdzzlController {
    @Autowired
    private IC37InfJcDwzlService c37InfJcDwzlService;
    @Log(title = "多地址同步", logType = LogType.INSERT)
    @PostMapping("/sync")
    public JsonResult sync() {
        return c37InfJcDwzlService.SyncToJzt();
    }

    @GetMapping("list")
    public JsonResult list(JztCustAddrQuery query) {
        return c37InfJcDwzlService.getAddrList(query);
    }

}
